#ifndef TOAST_H
#define TOAST_H

#include <QWidget>
#include <QPoint>

class Toast : public QWidget
{
    Q_OBJECT
public:

    enum Type{
        Succ,
        Warn
    };

    Toast(const QString &message, const QPoint &centerPos, const QString& imgObjName = "", QWidget *parent = Q_NULLPTR);
    ~Toast();

    static void toast(const QString &message, const QPoint &centerPos, QWidget *parent = Q_NULLPTR);
    static void toast(const QString &imgObjName, const QString &message, const QPoint &centerPos, QWidget *parent = Q_NULLPTR);
    static void toast(Type type, const QString &message,  QWidget *parent = Q_NULLPTR);

public slots:

private:
    void setupUi();
    void createConnect();


private:
    QString message;
    QPoint centerPos;
    QString imgObjName;


};

#endif // TOAST_H
